package com.base.cn.platform.os.service.manage.user.account;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

/**
 * 用户提现账户接口
 *
 * @author s.li
 * @date 2018/12/01
 */
@FeignClient(name = BaseService.appName,configuration = FeignAuthConfig.class)
public interface CusUserCashAccountService extends BaseService {
    /**
     * 保存用户提现账户记录
     * @param userCashAccount
     * @return Map<String,Object>
     */
    @RequestMapping(contextPath + "/account/saveUserCashAccount")
    Map<String,Object> saveUserCashAccount(@RequestBody Map<String, Object> userCashAccount);

    /**
     * 查询用户的提现账户数据列表
     * @param userId 用户ID
     * @return TreeMap<Integer,Map<String,Object>>
     */
    @RequestMapping(contextPath + "/account/findUserCashAccount")
    TreeMap<Integer,Map<String,Object>> findUserCashAccount(@RequestParam("userId") BigDecimal userId);

    /**
     * 获取用户绑定的账户列表
     * @param userId 用户ID
     * @return List<Map<String,Object>>
     */
    @RequestMapping(contextPath + "/account/findUserCashAccountList")
    List<Map<String,Object>> findUserCashAccountList(@RequestParam("userId") BigDecimal userId);

    /**
     * 通过账户类型，查询提现账户
     * @param accountType 账户类型
     * @return Map<String,Object>
     */
    @RequestMapping(contextPath + "/account/findUserCashAccountByType")
    Map<String, Object> findUserCashAccountByType(@RequestParam("userId") BigDecimal userId,
                                                  @RequestParam("accountType") int accountType);
}
